package com.colin.controller;

import com.colin.pojo.ChanPianGongXuTimeTabile;
import com.colin.service.ProductAndManchineRelationSercice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("relation")
public class ProductAndManchineRelationController {
    @Autowired
    ProductAndManchineRelationSercice productAndManchineRelationSercice;
    @RequestMapping("delete")
    public String deleteAll(){
        productAndManchineRelationSercice.deleteALL();
        return "forward:/web/tiaoZhuan9";
    }
    @RequestMapping("insert")
    public String insert(ChanPianGongXuTimeTabile chanPianGongXuTimeTabile){
        productAndManchineRelationSercice.insert(chanPianGongXuTimeTabile);
        return "forward:/web/tiaoZhuan9";
    }
    @RequestMapping("deleteone")
    public String deleteone(Integer id){
        productAndManchineRelationSercice.deleteone(id);
        return "forward:/web/tiaoZhuan9";
    }
}
